<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>for循环</title>
	<style type="text/css">
        table tr td{
            border:1px solid blue;width:100px;height:50px;
        }
	</style>
</head>
<body>
    <script type="text/javascript">
        //小九九
        for(var i=1;i<=9;i++){
        	for(var j=1;j<=i;j++){
        		document.write(j*i+"="+j+"X"+i);
        		document.write('&nbsp;&nbsp;')
        	}
            
            document.write('<br/><br/>');

        }

        // for(var k=1;k<=9;k++){
        // 	for(var g=1;g<=9;g++){
        // 		document.write(k+"*"+g+"="+k*g);
        // 		document.write('&nbsp;&nbsp;')
        // 	}

        // 	document.write('<br/><br/>');
        // }


        //输出表格
        // document.write('<table>');
        // for(var x=1;x<=9;x++){
        // 	document.write('<tr>');
        // 	for(var y=1;y<=9;y++){
        // 		document.write('<td></td>');
        // 	}

        // 	document.write('</tr>');
        // }
          
        // document.write('</table>')
        // document.write('<br/><br/>');


       //在表格输出小九九
        document.write('<table>');
        for(var x=1;x<=9;x++){
        	document.write('<tr>');
        	for(var y=1;y<=9;y++){
        		 document.write('<td>'+x+"*"+y+"="+x*y+'</td>');   
        		  		
        	}
            
        	document.write('</tr>');
        }
          
        document.write('</table>')

    </script>
	


	
</body>
</html>